import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/admin/literature/book',
    method: 'get',
    params
  })
}

export function delList(file_id) {
  return request({
    url: '/admin/literature/book/'+file_id,
    method: 'DELETE',
  })
}
export function addForm(data) {
  return request({
    url: '/admin/literature/book',
    method: 'post',
    data
  })
}
export function addFormEditor(data,file_id) {
  return request({
    url: '/admin/literature/book/'+file_id,
    method: 'put',
    data
  })
}
export function editorForm(id) {
  return request({
    url: '/admin/literature/book/'+id,
    method: 'get',
  })
}
// 阅读
export function read(params){
  return request({
    url:'/index/homepage/bookReading',
    method:'get',
    params
  })
}
// 查看
export function video(params){
  return request({
    url:'/index/homepage/videoReading',
    method:'get',
    params
  })
}
// 更多评论
export function comments(params){
  return request({
    url:'/index/homepage/moreComments',
    method:'get',
    params
  })
}
// 发表评论
export function addComments(data){
  return request({
    url:'/index/homepage/addComment',
    method:'post',
    data
  })
}